home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / gethostname.z / gethostname
Encoding:
Text File  |  2002-10-03  |  2.7 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ggggeeeetttthhhhoooossssttttnnnnaaaammmmeeee((((2222))))                                                  ggggeeeetttthhhhoooossssttttnnnnaaaammmmeeee((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      gethostname, sethostname - get/set name of current host
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<uuuunnnniiiissssttttdddd....hhhh>>>>
  13.      iiiinnnntttt ggggeeeetttthhhhoooossssttttnnnnaaaammmmeeee ((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, ssssiiiizzzzeeee____tttt nnnnaaaammmmeeeelllleeeennnn))));;;;
  14.      iiiinnnntttt sssseeeetttthhhhoooossssttttnnnnaaaammmmeeee ((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, iiiinnnntttt nnnnaaaammmmeeeelllleeeennnn))));;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _G_e_t_h_o_s_t_n_a_m_e returns the standard hostname for the current processor, as
  18.      previously set by _s_e_t_h_o_s_t_n_a_m_e.  The parameter _n_a_m_e_l_e_n specifies the size
  19.      of the _n_a_m_e array.  The returned name is null-terminated and truncated if
  20.      insufficient space is provided.
  21.  
  22.      _S_e_t_h_o_s_t_n_a_m_e sets the name of the host machine to be _n_a_m_e, which has
  23.      length _n_a_m_e_l_e_n.  This call is restricted to the superuser and is normally
  24.      used only when the system is bootstrapped.
  25.  
  26. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  27.      If the call succeeds a value of 0 is returned.  If the call fails, then a
  28.      value of -1 is returned and an error code is placed in the global
  29.      location _e_r_r_n_o.
  30.  
  31. EEEERRRRRRRROOOORRRRSSSS
  32.      The following errors may be returned by these calls:
  33.  
  34.      [EFAULT]       The _n_a_m_e or _n_a_m_e_l_e_n parameter gave an invalid address.
  35.  
  36.      [EPERM]        The caller tried to set the hostname and was not the
  37.                     superuser.
  38.  
  39.      [EINVAL]       The _n_a_m_e_l_e_n parameter was too large.
  40.  
  41. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  42.      gethostid(2)
  43.  
  44. BBBBUUUUGGGGSSSS
  45.      Hostnames are limited to MAXHOSTNAMELEN (from <_s_y_s/_p_a_r_a_m._h>) characters,
  46.      currently 256.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.